//
//  NetcodeHelper.h
//  BetsAndBrains
//
//  Created by Augustine, Eric M (augus011) on 4/28/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NetcodeHelper : NSObject

+(NSInteger)byteArrayToInt:(NSArray*)byteArray;
+(NSArray*)intToByteArray:(NSInteger)value;
+(Byte*)generateMessageByteArray:(Byte)code;
+(NSString*)SERVER_ADDRESS;
+(NSInteger)SERVER_PORT;
+(NSInteger)DATA_OFFSET;
+(NSInteger)BB_MESSAGE_ID_INDEX;
+(NSInteger)BB_MESSAGE_VERSION_INDEX;
+(NSInteger)BB_MESSAGE_TYPE_INDEX;
+(NSInteger)MAX_MESSAGE_LENGTH;
+(NSInteger)NUMBER_OF_SENDING_MESSAGE_ATTEMPTS;
+(NSInteger)MILLISECONDS_BETWEEN_SENDING_MESSAGE;
+(Byte)BRAINS_AND_BETS;
+(Byte)MESSAGE_VERSION;
+(Byte)CONNECTION_REQUEST;
+(Byte)CONNECTION_RESPONSE;
+(Byte)SERVER_LOBBY_INFO_REQUEST;
+(Byte)SERVER_LOBBY_INFO_RESPONSE;
+(Byte)JOIN_GAME_REQUEST;
+(Byte)GAME_LOBBY_INFO;
+(Byte)CREATE_GAME_REQUEST;
+(Byte)START_GAME_REQUEST;
+(Byte)QUESTION;
+(Byte)ANSWER;
+(Byte)BETTING_ODDS;
+(Byte)SUBMIT_BETS;
+(Byte)ROUND_RESULTS;
+(Byte)NEXT_ROUND_REQUEST;
+(Byte)LEAVE_GAME_REQUEST;
+(Byte)GAME_RESULTS;
+(Byte)DISCONNECT;
+(Byte)ARE_YOU_THERE;
+(Byte)ERROR;
+(Byte)MESSAGE_RECEIVED;
+(Byte)JOIN_GAME_INVITE;
+(Byte)ERROR_BAD_GAME;
+(Byte)ERROR_BAD_VER;
+(Byte)ERROR_BAD_TYPE;
+(Byte)ERROR_BAD_MESSAGE;
+(Byte)ERROR_BAD_CLIENTID;
+(Byte)ERROR_BAD_GAMEID;
+(Byte)ERROR_FULL_GAME;
+(Byte)ERROR_GAME_IN_PROGRESS;
+(Byte)ERROR_GAME_NOT_FOUND;
+(Byte)ERROR_END_OF_MESSAGE;
+(Byte)ERROR_OTHER;
+(Byte)END_OF_STRING;
+(Byte)END_OF_RECORD;
+(Byte)END_OF_MESSAGE;


@end
